package com.zcs.shardingjdbc.provider;

import com.zcs.shardingjdbc.entity.User;
import org.apache.ibatis.jdbc.SQL;

/**
 * @author zcs
 */
public class UserProvider {

    public String list() {
        return new SQL() {
            {
                SELECT("*");
                FROM("user");
            }
        }.toString();
    }

    public String insert(User user) {
        return new SQL() {
            {
                INSERT_INTO("user");
                VALUES("name", "#{name}");
                VALUES("city", "#{city}");
            }
        }.toString();
    }
}

